home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
CRS
/
crs47.d81
/
64alv1a.sfx
/
basics.txt
< prev
next >
Wrap
Text File
|
1990-02-12
|
11KB
|
322 lines
┬┴╙╔├ ╥╧╒╘╔╬┼╙
-----------------------
╬╧ ╠╔╙╘╔╬╟
╨LACE A SHIFTED ╠ IN A ╥┼═ STATEMENT AT THE START OF THE PROGRAM. ╘HE
PROGRAM CANNOT BE LISTED UNLESS A LINE NUMBER BEYOND THE ╥┼═ STATEMENT
IS SPECIFIED.
**************************************************************
╔╬─┼╬╘ ╠╔╙╘╔╬╟╙
╘O INDENT PROGRAM LISTINGS ON THE 64, MAKE THE FIRST CHARACTER
AFTER THE LINE NUMBER A SHIFTED SPACE. ╘HE REMAINING CHARACTERS
ON THAT LINE WILL NOT BE LEFT JUSTIFIED WHEN YOU LIST THE PROGRAM.
╘HIS ALLOWS YOU TO USE LOOP INDENTATION.
100 ╥┼═ ╙┴═╨╠┼ ╠╧╧╨
110 ╞╧╥ ╔=1╘╧10
120 ╨╥╔╬╘ "├╧═╨╒╘┼╥╙ ┴╥┼ ╞╒╬!"
130 ╨╥╔╬╘
140 ╬┼╪╘
150 ┼╬─
**************************************************************
═┴╦╔╬╟ ┴ ┬┴╙╔├ ┬╒╟ ╒╙┼╞╒╠
╫HEN DOCUMENTING ╟╧╙╒┬S AND ╟╧╘╧S, INSTEAD OF USING ╥┼═, AS IN:
╟╧╙╒┬ 1000:╥┼═ *╔╬╨╒╘ ─┴╘┼
╟╧╙╒┬ 2000:╥┼═ *┼╘├┼╘┼╥┴
┘OU CAN FIT MORE COMMENTS ON THE LINE BY LEAVING OUT THE ╥┼═,
AND FOLLOWING THE DESTINATION LINE NUMBER WITH ANY CHARACTER:
╟╧╙╒┬ 1000'╔╬╨╒╘ ─┴╘┼
╟╧╙╒┬ 2000'┼╘├┼╘┼╥┴
***************************************************************
╔═╨╥╧╓┼─ ╔╬╨╒╘
┴ QUESTION MARK IS NOT DISPLAYED. [╥┼╘╒╥╬] DOESN'T STOP PROGRAM
EXECUTION:
100 ╨╥╔╬╘ "┼╬╘┼╥ ┘╧╒╥ ╬┴═┼";
110 ╧╨┼╬1,0:╔╬╨╒╘#1,╬$;╨╥╔╬╘:├╠╧╙┼1
120 ╨╥╔╬╘#1,├╚╥$(16)"08";╬$
130 ├╠╧╙┼
*******************************************************************
╨╥╔╬╘┼╥ ╘┴┬
┘OU MAY USE THE ╘┴┬ FUNCTION WITH THE 64 AND VARIOUS PRINTERS AS FOLLOWS:
100 ╧╨┼╬1,4
110 ╬$="╘┼╙╘"
120 ╨╥╔╬╘#1,├╚╥$(16)"08":╬$
130 ├╠╧╙┼1
*****************************************************************************
╙┘╙ ╠╔╙╘
--------
┴N INCOMPLETE BUT USEFUL LIST OF COMMONLY USED ╙┘╙ COMMANDS.
----------------------------------------------------------------------------
╙┘╙ ╚┼╪ ┴├╘╔╧╬
----------------------------------------------------------------------------
65126 $╞┼66 ┬ASIC ╫ARM ╙TART
64738 $╞├┼2 ┬ASIC ├OLD ╙TART
59626 $┼8┼┴ ╙CROLL ╙CREEN ONE LINE
59516 $┼87├ ═OVE ├╥╙╥ ─OWN ONE LINE
58726 $┼566 ╚OME THE ├URSOR (╘OP-╠EFT ├ORNER)
58692 $┼544 ├LEAR ╙CREEN & ╚OME ├URSOR
58266 $┼39┴ ╨RINT ╙TART-UP ═ESSAGE
57194 $─╞6┴ ╥ESET ╞┴╙╘╠╧┴─ (╥TRNS TO ─IRECT ═ODE)
42115 $┴483 ╥ETURN TO ┬┴╙╔├ & DON'T ╨RINT ╥┼┴─┘
42100 $┴474 ╥ETURN TO ╥┼┴─┘
*****************************************************************************
═╧╥┼ ╙┘╙ ╓┴╠╒┼╙
╙┘╙ 65511 ├LOSES ALL OPEN FILES.
╙┘╙ 58250 ╔NITIALIZE.
╙┘╙ 59903 ├LEARS LINE OF TEXT.
╙┘╙ 59062 ┴DVANCES CURSOR.
╙┘╙ 59626 ╙CROLLS A LINE.
╙┘╙ 59137 ╨REVIOUS LINE.
╙┘╙ 42562 ╬┼╫
*****************************************************************
┴ ╨╠┼┴╙┴╬╘ ┬┼╠╠
╨╧╦┼54273,70:╨╧╦┼54278,249:
╨╧╦┼54296,15:╨╧╦┼54276,17:
╨╧╦┼54276,16
*****************************************************************
╨┴╒╙┼ ╔╬ ╨╥╧╟╥┴═
╘HIS COMMAND WILL PAUSE THE PROGRAM WHILE THE ╙╚╔╞╘ ╠╧├╦ KEY IS PRESSED:
╫┴╔╘ 654,1,1
╘HIS IS A GOOD WAY TO SYNCHRONIZE A PROGRAM WITH AN EXTERNAL PROCESS.
*********************************************************************
╒╬╠╒├╦┘ ╬╒═┬┼╥
╞OR A SURPRISING RESULT, ENTER THIS NUMBER IN IMMEDIATE MODE:
350800 [╥┼╘╒╥╬]
***********************************************************************
├╧╥╥┼├╘ ┬┘╘┼╙ ╞╥┼┼
?╞╥┼(0)-(╙╟╬(╞╥┼(0)0(0)*65535+3
************************************************************************
╨OPULAR ╨OKES
---------------------------------------
╨╧╦┼ ╫╔╘╚ ┼╞╞┼├╘ ╥┼╙╘╧╥┼
---------------------------------------
56325 0-255 ├HANGE ├╥╙╥ ┬LINK ╙PEED
53281 0-15 ├HANGE ┬ACKGROUND ├OLOR
53280 0-15 ├HANGE ┬ORDER ├OLOR
53272 21 ╒PPER ├ASE & ╟RAPHICS
53272 23 ╠OWER ├ASE & ╒PPER ├ASE
53265 11 ┬LANK ╙CREEN 27
819 246 ─ISABLE ╙AVE 245
808 239 ─ISABLE ╙TOP ╦EY 237
808 234 " ╙TOP/╥ESTORE/╠IST 237
792 193 ─ISABLE ╥ESTORE ╦EY 71
788 52 ─ISABLE ╙TOP ╦EY 49
775 168 ─ISABLE ╠IST 167
775 171 ├RASH ON ╠IST *167*
774 0 ╠IST-╠INE ╬MBRS ╧NLY 26
770/771 106/223╥ESET ╞┴╙╘╠╧┴─ (MUST BE
ENTERED IN ONE LINE)
770/771 131/164─ISABLE ╞┴╙╘╠╧┴─ (ENTER
IN ONE LINE)
657 128 ─ISABLE ╙HIFT ╦EY 0
650 128 ┴LL ╦EYS ╥EPT(╬ONE=64)0
649 0 ─ISABLE ╦EYBOARD 10
646 0-15 ├HANGE ├HARACTER ├OLOR
214 0-24 ╙ET ├╥╙╥ TO ╘HIS ╥OW
(═UST FOLLOW WITH ╨╥╔╬╘)
211 0-79 ╙ET ├╥╙╥ ╘O ╘HIS ├OLUMN
204 0 ┬LINK ├╥╙╥ ─URING ╟ET >0
198 0 ├LEAR ╦EYBOARD ┬UFFER
153 15 ─ISABLE ╦EYBOARD 0
152 0 ├LOSE ┴LL ╞ILES -
22 35 ╠IST W/NO LINENUMBERS 25
19 32 ─ELETE '?' ON ╔NPUT 0
╨┼┼╦(65408) ╦ERNAL ╓ERSION(╠ATEST = 3)
*****************************************************************************
═╧╥┼ ┬┴╙╔├ ╥╧╒╘╔╬┼╙
-------------------
╤.> ╚OW CAN ╔ LIST THE DISK DIRECTORY WHEN USING A PROGRAM. (BUILT-IN TO THE
PROGRAM AS A FEATURE).
┴.> ╘HIS WILL WORK. ╧R YOU CAN CREATE AN ARRAY AND ENTER THE DATA IN B$ INTO
THE ARRAY SO THAT YOU CAN LATER USE IT TO LOAD A FILE BY NUMBER, DISPLAY
IT OR WHATEVER.
10 GOSUB350:END
350 Q$=CHR$(34):OPEN2,8,0,"$0:*"
360 GET#2,A$:A=-(ST<>0)-2*(A$=Q$):ONAGOTO370,380:GOTO360
370 T=0:CLOSE2:RETURN
380 GET#2,A$:A=-(A$=Q$):ONAGOTO390:B$=B$+A$:GOTO380
390 PRINTB$:B$="":GOTO360
╤.> ╚OW CAN ╔ MAKE ╙EQ FILES? ┴ND HOW CAN ╔ SAVE THEM?
┴.> THE BASICS ARE: ┘OU CREATE A ╙EQUENTIAL FILE BY OPENING IT, WRITING DATA
TO IT AND THEN CLOSING IT.
10 OPEN2,8,2,"NAME,S,W":REM,S,W TELLS A DRIVE "╙EQUENTIAL, ╫RITE"
20 PRINT#2, "╩OE ╩ONES"
30 PRINT#2:CLOSE2
40 OPEN3,8,3,"NAME,S,R":REM THE ,S,R SAYS "╙EQUENTIAL, ╥EAD"
50 FORI=0TO1:GET#3,A$:I=ST:PRINT A$;:NEXT
60 CLOSE3
┘OU CAN WRITE ANY DATA THAT YOU HAVE. ╔F YOUR DATA IS NUMERICAL, IT IS BEST
TO WRITE IT AS A CHARACTER STRING. AS X=150:X$=CHR$(X):PRINT#2,X$. ╘O READ IT
USE: GET#2,X$:X=ASC(X$+CHR$(0)). ╘HE +CHR$(0) PREVENTS A CRASH IN CASE THE
VALUE IS 0. ╘HE ├64 WILL READ 0 AS A NULL STRING "" AND CRASH ON ASC(X$).
╘HAT IS A BUG, ACTUALLY.
╙┼╤╒┼╬╘╔┴╠ ╞╔╠┼╙: ╙EQUENTIAL FILES ARE MOST COMMONLY USED AS ╘EXT ╞ILES OR
DATA FILES. ┘OU FIRST OPEN A SEQ FILE (WHETHER IT ALREADY EXISTS OR NOT)
LIKE THIS: ╧╨┼╬ FILE#,DEVICE#,CHANNEL#,"0:FILENAME,TYPE,DIRECTION"
╘HE FILE NUMBER IS ANY NUMBER FROM 1 TO 15, IT REALLY DOESN'T MATTER. ╘HE
DEVICE NUMBER IS THE NUMBER OF YOUR DRIVE, USUALLY 8. ╘HE CHANNEL NUMBER IS
ANY NUMBER FROM 1 TO 14 (15 IS THE COMMAND CHANNEL). ╘HE FILENAME GOES NEXT
FOLLOWED BY THE FILETYPE (╙ FOR SEQ FILE, ╨ FOR PRG, ╒ FOR USR, AND ╥
FOR REL). ╘HE DIRECTION IS EITHER ╥EAD OR ╫RITE, WHEN YOU FIRST OPEN THE FILE
IT SHOULD BE ,╫ FOR WRITE. ┼XAMPLE:
╧╨┼╬2,8,13,"0:╙┼╤╞╔╠┼,╙,╫"
╘HEN YOU CAN WRITE YOUR DATA TO THE FILE WITH THE FOLLOWING COMMAND:
╨╥╔╬╘#FILE#,VARIABLE LIST
╫HERE THE FILE NUMBER IS THE ONE YOU USED WHEN OPENING THE THING. ┼X:
╨╥╔╬╘#2,┴$,┬$,┌$
╫HEN FINISHED WITH THE FILE, BE SURE TO ├╠╧╙┼FILE#... ┼X:
├╠╧╙┼2
╬O SAVING NECESSARY. ┘OU CAN THEN READ THE FILE BY SUBSTITUTING THE ╫ IN THE
OPEN COMMAND FOR AN ╥, AND THEN USING THE ╔╬╨╒╘# OR ╟┼╘# COMMANDS INSTEAD OF
THE ╨╥╔╬╘# COMMAND.
(┼─╔╘╧╥'╙ ╬╧╘┼: ╙EE THE EXTENSIVE FILE ELSEWHERE IN THIS ISSUE ON HOW TO USE
╙┼╤ FILES IN PROGRAMMING.)
*****************************************************************************
╞╔╠┼╬┴═┼ ╙╒╞╞╔╪┼╙
-------------------
╞OR A MORE UNDERSTANDABLE DIRECTORY, TRY USING A SUFFIX AFTER A FILE NAME.
┴LSO, ╙INCE THE COMPUTER WORLD IS BECOMING MORE COMPATIBLE IT WOULD MAKE
THE LIFE OF ┬ULLETIN ┬OARD ╙YSTEM ╧PERATORS (╙┘╙╧╨╙) MUCH EASIER IF WE ALL
TRIED TO FOLLOW THE FILENAME CONVENTIONS USED BY OTHER COMPUTERS. ╘HE ═╙-─╧╙
COMPUTERS AND OTHERS USE AN 8 LETTER FILE NAME FOLLOWED BY A PERIOD AND THEN
A 3 LETTER EXTENSION THAT EXPLAINS THE FILETYPE. ╬O OTHER PERIODS OR COMMAS
ARE USED IN THE FILENAME. ╞OR EXAMPLE, IF YOUR PROGRAM IS IN ┬┴╙╔├, YOU WOULD
USE THE SUFFIX ".┬┴╙" SO YOUR PROGRAM NAME WOULD BE:
╨╥╧╟╥┴═.┬┴╙
╔F IT'S A DOCUMENTATION FILE, USE "─╧├" OR "╘╪╘". ╚ERE IS A LIST OF THE
GENERALLY ACCEPTED SUFFIXES, MANY OF WHICH ARE USED IN ├╨/═ & ═╙-─╧╙.
.┴─╓ ┴─╓┼╬╘╒╥┼ ╟┴═┼
.┴╥├ ┴╥├┼─ ╞╔╠┼ (├╧═╨╥┼╙╙┼─)
.┴╥╩ ┴╥╩ ╞╔╠┼╙ (├╧═╨╥┼╙╙┼─)
.┴╥╦ ┴╥╦┼─ ╞╔╠┼ (├╧═╨╥┼╙╙┼─)
.┴╙═ ┴╙╙┼═┬╠┼╥ ╙╧╒╥├┼ ╞╔╠┼
.┬┴╦ ┬┴├╦-╒╨ ╞╔╠┼
.┬┴╙ ┬┴╙╔├ ╨╥╧╟╥┴═ ╞╔╠┼
.├┴╘ ├┴╘┴╠╧╟ ─┴╘┴ ╞╔╠┼
.─┴╘ ─┴╘┴ ╞╔╠┼
.─┬╞ ─┴╘┴ ┬┴╙┼ ╞╔╠┼
.─╔╥ ─╔╥┼├╘╧╥┘ ╞╔╠┼
.─╧├ ─╧├╒═┼╬╘ ╞╔╠┼
.╞╘╚ ╞╧╥╘╚ ╨╥╧╟╥┴═ ╞╔╠┼
.╟╔╞ ╟╔╞ ╞╧╥═┴╘ ┴╥╘ ╞╔╠┼
.╚╠╨ ╚┼╠╨ ╞╔╠┼
.╔─╪ ─┴╘┴ ╞╔╠┼ ╔╬─┼╪
.╔╬╨ ╔╬╨╒╘ ╞╔╠┼
.╠╔┬ ╠╔┬╥┴╥┘ ╞╔╠┼ (╠╔╬╦┼─ ╞╔╠┼╙)
.╠╙╘ ╨╥╔╬╘┼╥ ╞╔╠┼
.╠╬╪ ╠┘╬╪┼─ ╞╔╠┼ (╠╔╬╦┼─ ╞╔╠┼╙)
.═╠╟ ═┴├╚╔╬┼ ╠┴╬╟╒┴╟┼ ╨╥╧╟╥┴═
.═╒╙ ═╒╙╔├ ╞╔╠┼
.╬┴═ ╬┴═┼ ╞╔╠┼
.╧┬╩ ═┴├╚╔╬┼ ╠┴╬╟╒┴╟┼ ╨╥╧╟╥┴═
.╧╒╘ ╧╒╘╨╒╘ ╞╔╠┼
.╨┴╙ ╨┴╙├┴╠ ╨╥╧╟ ╞╔╠┼ (╙╧╒╥├┼)
.╨╟═ ╨╥╧╟╥┴═ ╞╔╠┼
.╨╔├ ╨╔├╘╒╥┼ ╞╔╠┼
.╥┼╞ ╥┼╞┼╥┼╬├┼ ╞╔╠┼
.╥╨╘ ╥┼╨╧╥╘ ╞╔╠┼
.╙─┴ ╙┼╠╞-─╔╙╙╧╠╓╔╬╟ ┴╥├╚╔╓┼ (├╧═╨╥┼╙╙┼─)
.╙─╠ ╙┼╠╞-─╔╙╙╧╠╓╔╬╟ ╠┘╬╪ ╞╔╠┼╙
.╙┼╘ ╙┼╘╒╨ ╞╔╠┼
.╙╞╪ ╙┼╠╞-─╔╙╙╧╠╓╔╬╟ ╞╔╠┼╙ (├╧═╨╥┼╙╙┼─)
.╙╥╘ ╙╧╥╘ ╞╔╠┼
.╙┘═ ╙┘═┬╧╠/├╚┴╥┴├╘┼╥ ╞╔╠┼
.╙┘╙ ╙┘╙╘┼═ ╞╔╠┼
.╘┼╠ ╘┼╠┼╨╚╧╬┼ ╬╒═┬┼╥ ╞╔╠┼
.╘╙╘ ╘┼╙╘ ╞╔╠┼
.╘╪╘ ╘┼╪╘ ╞╔╠┼
.╒╘╠ ╒╘╔╠╔╘┘ ╞╔╠┼
.╓┴╥ ╓┴╥╔┴┬╠┼ ╞╔╠┼
.╓╙─ ╓╔╙╔╧╬ ╙┼╠╞-─╔╙╙╧╠╓┼ (╠╔╬╦┼─ ╞╔╠┼╙)
.╪─╓ ╙╨┼├╔┴╠ ─┼╓╔├┼ ╬┼┼─┼─
.┌╔╨ ┌╔╨╨┼─ ╞╔╠┼ (╠╔╬╦┼─ ╞╔╠┼╙)
.128 ├-128 ═╧─┼ ╧╬╠┘
╧NE NEW PROBLEM IS THAT THERE ARE DIFFERENT PROGRAMS FOR ┌╔╨ AND ┴╥├ USED IN
THE ═╙-─╧╙ AND OTHER OPERATING SYSTEMS, BUT THE SAME FILE EXTENSION IS USED
FOR BOTH FORMS OF THESE PROGRAMS ╔T HAS RECENTLY BECOME EVEN MORE CONFUSING
BECAUSE WE CAN NOW ╒╬┴╥├ ═╙-─╧╙ ┴╥├ FILES THANKS TO A PROGRAM WRITTEN BY
BY ├HRIS ╙MEET. ┴NYONE HAVE A SOLUTION TO TELL WHICH IS WHICH??
┴╥╩ ╞ILES ARE NOT PRESENTLY MADE IN C64 FORMAT BUT SINCE ╔ KNOW THAT
SEVERAL PROGRAMMERS ARE WORKING ON IT ╔ INCLUDED IT.
╔F ANYONE HAS ANYTHING ╔ MISSED OR ADDITIONAL SUGGESTIONS FOR THIS FILE
PLEASE FEEL FREE TO WRITE TO US OR COMMUNICATE IN THE ├┬═ ┼CHO
OF ╞IDONET. ╔ WILL UPDATE IT AS NEW INFORMATION BECOMES AVAILABLE.
*****************************************************************************